package com.beta.job;

import com.beta.service.IOrderStatusService;
import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * Created by vector on 2016/12/12.
 */
public class OrderExpireStatusSyncJob implements SimpleJob {

    private final Logger logger = LoggerFactory.getLogger(getClass());

    @Autowired
    private IOrderStatusService ordersStatusService;

    @Override
    public void execute(ShardingContext shardingContext) {
        logger.info("定时任务 - 订单过期状态同步任务 ==> start ... ");
        ordersStatusService.executeSyncExpiredOrderStatus();
        logger.info("定时任务 - 订单过期状态同步任务 ==> end ... ");
    }

}
